/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ObjetData;

import DAO.DaoAccessoire;

/**
 *
 * @author M-Soft
 */
public class Accessoire extends Article {

    private Integer idAccessoire;
    //private String label;
    private double poids;

    public int getIdAccessoires() {
        return idAccessoire;
    }

    public void setIdAccessoires(int idValue) {
        this.idAccessoire = idValue;
    }

    public double getPoids() {
        return poids;
    }

    public void setPoids(double poidsValue) {
        this.poids = poidsValue;
    }

    public Accessoire() {
    }
    /*
    public Accessoires(Integer idAccessoireValue) {
    this.idAccessoire = idAccessoireValue;
    DaoAnimal dao=new DaoAnimal();
    Animal a=dao.find(idAnimal);
    if(a!=null){
    this.dateNaissance=a.getDateNaissance();
    this.idCouleurPrincipal=a.getIdCouleur();
    this.nom=a.getNom();
    this.sexe=a.getSexe();
    this.setIdEspece(a.getIdEspece());
    this.setPhoto(a.getPhoto());
    this.setPrixht(a.getPrixht());
    this.setTva(a.getTva());
    }
    }
     */

    public Accessoire(int id, String labelValue, double poidsValue) {
        this.setIdAccessoires(id);
        //this.setLabel(labelValue);
        this.setPoids(poidsValue);
    }
    /*
    public Animal(int id, String nomValue, String sexeValue, double prixValue, int qteValue) {
    this.setIdAninmal(id);
    this.setNom(nomValue);
    this.setSexe(sexeValue);
    this.setPrixht(prixValue);
    this.setTva(19.6);
    this.setQuantite(qteValue);
    
    }
    
    public Animal(Animal a){
    this.dateNaissance=a.getDateNaissance();
    this.idCouleurPrincipal=a.getIdCouleur();
    this.nom=a.getNom();
    this.sexe=a.getSexe();
    this.setIdEspece(a.getIdEspece());
    this.setPhoto(a.getPhoto());
    this.setPrixht(a.getPrixht());
    this.setTva(a.getTva());
    }
     */

    public void savePersistent() {
        DaoAccessoire accessDb = new DaoAccessoire();
        accessDb.save(this);
    }
}
